<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="ls" uri="/ls-trade-tags"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="cache" uri="http://www.opensymphony.com/oscache" %>

<html>
<head>
	<title>Index</title>
	<script type="text/javascript">
	function checkMenuIsExist(menu){
		alert(menu);
		if(menu!=null&& !menu.equals("")){
			alert(menu);
			return true;
		}
		return false;
	}
	
	</script>
</head>
<body>

                          <style>
						.sUL{
							list-style:url(../images/s_ul.gif);
							padding:0px;
							margin-top:10px;
						}
						.sUL li{
							padding:0px 3px;
							vertical-align:top !important;
						}
						.sUL li a{
							vertical-align:top !important;
							color:#880;
							font-size:15px;
							font-weight:bold;
							text-decoration:none;
						}
						.sUL li a:hover{
							text-decoration:underline;
							color:#550;							
						}
						.sX{							
							list-style-image:none;							
							margin:1px 10px 15px 10px; 
							padding:0px 0px;							
							vertical-align:middle !important;	
							border:0px solid red;					
						}
						.sX li{
							vertical-align:middle !important;							
							margin:3px 0px !important;	
						}
						.sX li a{
							vertical-align:middle !important;	
							color:#880;
							font-size:13px;
							font-weight:normal;
							text-decoration:none;
							margin:0px 0px !important;	
							padding:0px 0px;
							border:0px solid red;							
						}
						</style>

	<s:if test="#session.SPRING_SECURITY_CONTEXT!=null">
	
		<%
			String userName = org.springframework.security.core.context.SecurityContextHolder.getContext().getAuthentication().getName();
			String htmlMenuCacheKey = "html_menu_" +userName+"_"+ session.getAttribute("roleCode") + "_" + request.getAttribute("com.opensymphony.xwork2.ActionContext.locale");
		%>
		
		<cache:cache key="<%=htmlMenuCacheKey%>" groups="menu">
			<s:action namespace="/home" name="home!menuHtml" var="htmlMenuAction" flush="false"></s:action>
			<s:property value="#htmlMenuAction.menu" escapeHtml="false"/>	
		</cache:cache>
	</s:if>

</body>
</html>